import java.io.*;
import java.net.*;

public class VLCControler{
	Socket socket = null;
    static PrintWriter out = null;
    static BufferedReader in = null;
	BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
   	String serveraddress="127.0.0.1";
	public VLCControler(){
		try {
            socket = new Socket(serveraddress, 1234);
            out = new PrintWriter(socket.getOutputStream(), true);
            in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    		System.out.println("Connected");
        } catch (UnknownHostException e) {
            System.err.println("Don't know about host");
            System.exit(1);
        } catch (IOException e) {
            System.err.println("Couldn't get I/O for the connection");
        }
	}
	
	
	
    public static void comando(String cmd) {
                        
		System.out.println(cmd); //Uncomment to debug
			out.println(cmd);
			try {
				while (!in.ready()) {}
				System.out.println(in.readLine());
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	         
			
			
    }
}